﻿using System;
using System.Text;
using System.Data;
using System.Xml;
using System.Threading;
using System.Reflection;
using System.Collections.Generic;
using Cosmos.Hardware;
using Cosmos.Hardware.Plugs;
using Cosmos.IL2CPU;
using Cosmos.IL2CPU.X86;
using Cosmos.Kernel;
using Cosmos.Kernel.Plugs;
using Cosmos.Sys;
using Cosmos.Sys.FileSystem;
using Cosmos.Sys.Plugs;
using Cosmos.Compiler.Debug;
using Cosmos.Compiler.Builder;

/*
 * Platform OS Source Code
 * This code belongs to LeveL X and the developers who have
 * worked on it for them. Before using the source code please
 * ask Eamon N. Cusic Jr. (LeveL X Owner) by email at:
 * eamon.cusic@levelx.org
 * 
 * Platform OS is copyrighted to LeveL X as of 2012.
 * It uses the MIT License.
 * 
 * Written on 06/23/2012 at 8:35 AM EST (Eastern Standard Time)
 * Last Updated on 06/23/2012 at 8:35 AM EST
*/

using Platform_OS.Core.Init;

namespace Platform_OS.Core.Components
{
    class Screen //A bunch of methods to shorten code
    {
        #region Start

        public static void Init()
        {
            VGAScreen.SetMode320x200x8();
        }

        #endregion

        #region Set

        #region SetColor
        public static void SetColor(int index, byte red, byte green, byte blue)
        {
            VGAScreen.SetPaletteEntry(index, red, green, blue);
        }
        #endregion

        #region SetPixel
        public static void SetPixel(uint x, uint y, uint color)
        {
            VGAScreen.SetPixel320x200x8(x, y, color);
        }
        #endregion

        #endregion

        #region Clear
        public static void Clear(int color)
        {
            VGAScreen.Clear(color);
        }
        #endregion

        #region Get

        #region GetPixel
        public static uint GetPixel(uint x, uint y)
        {
            return VGAScreen.GetPixel320x200x8(x, y);
        }
        #endregion

        #endregion
    }
}
